<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="java.io.File"%>
<%@page import="com.qiniu.api.rsf.ListItem"%>
<%@page import="com.qiniu.api.rsf.ListPrefixRet"%>
<%@page import="com.qiniu.api.rsf.RSFClient"%>
<%@page import="com.qiniu.api.config.Config"%>
<%@page import="com.qiniu.api.auth.digest.Mac"%>
<%
    Mac mac = new Mac(Config.ACCESS_KEY, Config.SECRET_KEY);
    RSFClient client = new RSFClient(mac);
    ListPrefixRet list = client.listPrifix("binarylife", "image", "", 100);
    if(list.results.size()==0){
    	out.print("");
    }else{
	    StringBuffer sb = new StringBuffer();
	    for (ListItem item : list.results) {
	        sb.append(item.key + "-thumbsmall.jpg");
	        sb.append("ue_separate_ue");
	    }
	    String imgStr = sb==null ? "":sb.toString();
	    if (imgStr != "") {
	        imgStr = imgStr
	                .substring(0, imgStr.lastIndexOf("ue_separate_ue"))
	                .replace(File.separator, "/").trim();
	    }
	    out.print(imgStr);
    }
%>